package com.lory.springcloud.controller;

import com.lory.springcloud.entities.CommonResult;
import com.lory.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

@RestController
@Slf4j
@RequestMapping("/consumer")
public class OrderController {

    public static final String PROVIDER_URL = "http://cloud-provider-payment";

    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/payment/zk")
    public String paymentInfo(){
        return restTemplate.getForObject(PROVIDER_URL + "/payment/zk", String.class);
    }

}
